package com.kudian.restful.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Layout entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "layout")
public class Layout implements java.io.Serializable {

	// Fields

	private Integer layoutId;
	private Short adId;
	private Short position;
	private Short layoutGroup;

	// Constructors

	/** default constructor */
	public Layout() {
	}

	/** minimal constructor */
	public Layout(Short position, Short layoutGroup) {
		this.position = position;
		this.layoutGroup = layoutGroup;
	}

	/** full constructor */
	public Layout(Short adId, Short position, Short layoutGroup) {
		this.adId = adId;
		this.position = position;
		this.layoutGroup = layoutGroup;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "layout_id", unique = true, nullable = false)
	public Integer getLayoutId() {
		return this.layoutId;
	}

	public void setLayoutId(Integer layoutId) {
		this.layoutId = layoutId;
	}

	@Column(name = "ad_id")
	public Short getAdId() {
		return this.adId;
	}

	public void setAdId(Short adId) {
		this.adId = adId;
	}

	@Column(name = "position", nullable = false)
	public Short getPosition() {
		return this.position;
	}

	public void setPosition(Short position) {
		this.position = position;
	}

	@Column(name = "layout_group", nullable = false)
	public Short getLayoutGroup() {
		return this.layoutGroup;
	}

	public void setLayoutGroup(Short layoutGroup) {
		this.layoutGroup = layoutGroup;
	}

}